home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / graphic / flilib.zip / ALLFLIS.C < prev    next >
C/C++ Source or Header  |  1990-02-20  |  682b  |  47 lines

  1. /* allflis.c Play all the fli's in current directory once and exit. */
  2.  
  3. #include "aados.h"
  4. #include "aafli.h"
  5.  
  6. main()
  7. {
  8. Fndata *fn;
  9. int ivmode;
  10. Errval err;
  11.  
  12. fn = dos_get_dta();
  13. if (dos_first("*.FLI", DOS_ATTR_NORMAL))
  14.     {
  15.     ivmode = dos_get_vmode();
  16.     dos_set_vmode(0x13);
  17.     if (dos_get_vmode() == 0x13)
  18.         {
  19.         for (;;)
  20.             {
  21.             if (dos_key_is())
  22.                 {
  23.                 dos_key_in();
  24.                 break;
  25.                 }
  26.             err = fli_once(fn->name);
  27.             if (err < AA_SUCCESS)
  28.                 {
  29.                 puts(fli_error_message(err));
  30.                 }
  31.             if (!dos_next())
  32.                 break;
  33.             }
  34.         dos_set_vmode(ivmode);
  35.         }
  36.     else
  37.         {
  38.         puts("Not a VGA/MCGA display");
  39.         }
  40.     }
  41. else
  42.     {
  43.     puts("No .FLI files");
  44.     }
  45. }
  46.  
  47.